/*
 * Copyright (C) 2015 wxcx Inc. All rights reserved.
 */
package net.soulwolf.test.poidemo;

import android.content.Context;
import android.content.res.AssetManager;

import java.io.File;

import rx.Observable;


/**
 * author: Ewen
 * since : 15/11/16 上午10:24.
 */
public class OfficeConverter {

    private Context mContext;
    private String  mSaveDir;
    private AssetManager mAssetManager;

    public OfficeConverter(Context context){
        mContext = context;
        mAssetManager = mContext.getAssets();
        mSaveDir = mContext.getExternalCacheDir().getAbsolutePath() + "/office";
    }

    public Observable<File> wordConvert(String fileName){
        return BaseApi.wordConvert(fileName,mAssetManager,mSaveDir);
    }
}
